//全弃用，张宸昊说的 全部弃用

const IM = r => require.ensure([], () =>
  r(require('components/im/im.vue')), '/im'
);
const login = r => require.ensure([], () =>
  r(require('components/im/login.vue')), '/im'
);
const chat = r => require.ensure([], () =>
  r(require('components/im/chat.vue')), '/im'
);
const chatHistory = r => require.ensure([], () =>
  r(require('components/im/chatHistory.vue')), '/im'
);

export const imRoute = {
  path: '/vue/chat',
  component: IM,
  children: [
    {
        path: ':sessionId/:id?/:orderInfo',
        name: 'chat',
        component: chat,
    },
    {
        path: '/chatHistory/:sessionId',
        name: 'chatHistory',
        component: chatHistory,
    },
    {
        path: '/im/login',
        name: 'imlogin',
        component: login,
    }
  ],
  meta: {isPublish: true, requireAuth: false}
}
